# Copyright 2019 Google LLC
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
#     http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.

# NOTE: This file is auto generated by the elixir code generator program.
# Do not edit this file manually.

defmodule GoogleApi.ContentWarehouse.V1.Model.GoogleCloudContentwarehouseV1RunPipelineRequest do
  @moduledoc """
  Request message for DocumentService.RunPipeline.

  ## Attributes

  *   `exportCdwPipeline` (*type:* `GoogleApi.ContentWarehouse.V1.Model.GoogleCloudContentwarehouseV1ExportToCdwPipeline.t`, *default:* `nil`) - Export docuemnts from Document Warehouse to CDW for training purpose.
  *   `gcsIngestPipeline` (*type:* `GoogleApi.ContentWarehouse.V1.Model.GoogleCloudContentwarehouseV1GcsIngestPipeline.t`, *default:* `nil`) - Cloud Storage ingestion pipeline.
  *   `gcsIngestWithDocAiProcessorsPipeline` (*type:* `GoogleApi.ContentWarehouse.V1.Model.GoogleCloudContentwarehouseV1GcsIngestWithDocAiProcessorsPipeline.t`, *default:* `nil`) - Use DocAI processors to process documents in Cloud Storage and ingest them to Document Warehouse.
  *   `processWithDocAiPipeline` (*type:* `GoogleApi.ContentWarehouse.V1.Model.GoogleCloudContentwarehouseV1ProcessWithDocAiPipeline.t`, *default:* `nil`) - Use a DocAI processor to process documents in Document Warehouse, and re-ingest the updated results into Document Warehouse.
  *   `requestMetadata` (*type:* `GoogleApi.ContentWarehouse.V1.Model.GoogleCloudContentwarehouseV1RequestMetadata.t`, *default:* `nil`) - The meta information collected about the end user, used to enforce access control for the service.
  """

  use GoogleApi.Gax.ModelBase

  @type t :: %__MODULE__{
          :exportCdwPipeline =>
            GoogleApi.ContentWarehouse.V1.Model.GoogleCloudContentwarehouseV1ExportToCdwPipeline.t()
            | nil,
          :gcsIngestPipeline =>
            GoogleApi.ContentWarehouse.V1.Model.GoogleCloudContentwarehouseV1GcsIngestPipeline.t()
            | nil,
          :gcsIngestWithDocAiProcessorsPipeline =>
            GoogleApi.ContentWarehouse.V1.Model.GoogleCloudContentwarehouseV1GcsIngestWithDocAiProcessorsPipeline.t()
            | nil,
          :processWithDocAiPipeline =>
            GoogleApi.ContentWarehouse.V1.Model.GoogleCloudContentwarehouseV1ProcessWithDocAiPipeline.t()
            | nil,
          :requestMetadata =>
            GoogleApi.ContentWarehouse.V1.Model.GoogleCloudContentwarehouseV1RequestMetadata.t()
            | nil
        }

  field(:exportCdwPipeline,
    as: GoogleApi.ContentWarehouse.V1.Model.GoogleCloudContentwarehouseV1ExportToCdwPipeline
  )

  field(:gcsIngestPipeline,
    as: GoogleApi.ContentWarehouse.V1.Model.GoogleCloudContentwarehouseV1GcsIngestPipeline
  )

  field(:gcsIngestWithDocAiProcessorsPipeline,
    as:
      GoogleApi.ContentWarehouse.V1.Model.GoogleCloudContentwarehouseV1GcsIngestWithDocAiProcessorsPipeline
  )

  field(:processWithDocAiPipeline,
    as: GoogleApi.ContentWarehouse.V1.Model.GoogleCloudContentwarehouseV1ProcessWithDocAiPipeline
  )

  field(:requestMetadata,
    as: GoogleApi.ContentWarehouse.V1.Model.GoogleCloudContentwarehouseV1RequestMetadata
  )
end

defimpl Poison.Decoder,
  for: GoogleApi.ContentWarehouse.V1.Model.GoogleCloudContentwarehouseV1RunPipelineRequest do
  def decode(value, options) do
    GoogleApi.ContentWarehouse.V1.Model.GoogleCloudContentwarehouseV1RunPipelineRequest.decode(
      value,
      options
    )
  end
end

defimpl Poison.Encoder,
  for: GoogleApi.ContentWarehouse.V1.Model.GoogleCloudContentwarehouseV1RunPipelineRequest do
  def encode(value, options) do
    GoogleApi.Gax.ModelBase.encode(value, options)
  end
end
